package com.atguigu.day04.HomeWork;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/3 17:04
 * @注释 打印七行七列,其中O打印出X的形状,其余打印*
 */
public class HomeWork3 {
    public static void main(String[] args) {
        for (int i =1; i<=7; i++){
            for (int j = 1; j<= 7; j++){
                if (i + j == 8 || i == j){
                    System.out.print("O ");
                }else{
                    System.out.print("* ");
                }
            }
            System.out.println();
        }
    }
}
